<h2 class="heading">Files</h2>
<div id="tutorials">
<?php if( isset( $isAdmin ) && $isAdmin === true ) : ?>
	<a class="add" href="/org/view/<?php echo $orgname ?>/tutorials/add">Add file</a>
<?php endif; ?>
<?php if( count( $tutorials ) === 0 ) :  ?> 
	No files yet
<?php endif;  ?> 
<?php foreach( $tutorials as $tutorial ) :  ?> 
	<div class="tutorial"> 
		<h2 class="title"><?php echo $tutorial['title'] ?></h2>
		<p class="date">Date posted: <?php echo $tutorial['date'] ?></p>
		<span class="label">Description:</span>
		<div class="description"><?php echo nl2br( $tutorial['description'] ) ?></div>
<!--		<a style="display: block; float: right;" href="/org/view/<?php echo $orgname ?>/tutorials/show/<?php echo $tutorial['topic_id'] ?>">Delete</a> -->
		<a class="show" href="/org/view/<?php echo $orgname ?>/tutorials/show/<?php echo $tutorial['topic_id'] ?>">View</a>
<!--		<a style="display: block; float: right;" href="#">Download file</a> -->
	</div>
<?php endforeach;?> 
</div>